# GNU Autotools "configure" detects w64devkit as an MSYS2 environment, so
# set some environment variables to disabuse it. Goes hand-in-hand with
# the busybox-w32 ash patch for libtool.
export PATH_SEPARATOR=';'
export ac_executable_extensions=.exe
export build_alias=x86_64-w64-mingw32
export LANG=en_US.UTF-8

# Check if we need to change directory after login
if [ -n "$CD_DIR" ]; then
    # Directly execute cd command to change to the specified directory
    cd "$CD_DIR"
    # Clear the environment variable after use
    unset CD_DIR
fi

export PATH="$WINKIT_HOME/share/ChezScheme-10.2.0/bin/a6nt":$PATH
export PATH="$WINKIT_HOME/share/lua/bin":$PATH
export PATH="$WINKIT_HOME/share/lua-language-server-3.15.0-win32-x64/bin":$PATH
export PATH="$WINKIT_HOME/share/luarocks-3.12.2-windows-64":$PATH
export PATH="$WINKIT_HOME/share/nasm/nasm-2.16.03-win64/nasm-2.16.03":$PATH
export PATH="$WINKIT_HOME/share/PortableGit/cmd":$PATH
export PATH="$WINKIT_HOME/share/upx-5.0.2-win64":$PATH
export PATH="$WINKIT_HOME/share/helix-25.07.1-x86_64-windows":$PATH
export PATH="$WINKIT_HOME/share/lazygit_0.55.0_windows_x86_64":$PATH
export PATH="$WINKIT_HOME/share/yazi-x86_64-pc-windows-msvc":$PATH

# 配置 GOLANG 独立语言服务环境变量
export PATH="$WINKIT_HOME/share/golangser":$PATH

# 配置 GOLANG 环境变量
export PATH="$WINKIT_HOME/share/go1.25.1.windows-amd64/go/bin":$PATH

# 配置 GOPROXY 环境变量
# export GOPROXY=https://proxy.golang.org,direct
export GOPROXY=https://goproxy.cn,direct
# export GOPROXY=https://goproxy.io,direct
# 可选: 指定私有仓库域名，绕过代理直接访问。值系私有仓库或者组，使用多个用逗号相隔即可。
# export GOPRIVATE=git.mycompany.com,github.com/your/private

# 配置 GOPATH 环境变量
export GOPATH=$WINKIT_HOME/share/gopath
export PATH="$GOPATH/bin":$PATH

# 配置 GOCACHE 环境变量
export GOCACHE=$WINKIT_HOME/share/gocache

# 配置 Clangd语言服务 环境变量
export PATH="$WINKIT_HOME/share/clangd-21.1.0-x86_64-pc-windows-msvc":$PATH

# 配置 ZIG/ZLS 环境变量
# 由于zig.exe文件有168MB，超过GITCODE单文件提交的100MB上限，故此WINKIT无法集成。如需启用，建议在自己$HOME目录的「.profile」中设置「export PATH="$HOME/program/zig-x86_64-windows-0.15.1":$PATH」
export PATH="$WINKIT_HOME/share/zls-x86_64-windows-0.15.0":$PATH

alias vim="nvim -u $WINKIT_HOME/root/files/sim/init.lua"

# 配置 yazi 使用 helix 作为 yazi 默认文本编辑器
export EDITOR="$WINKIT_HOME/share/helix-25.07.1-x86_64-windows/hx.exe"

# 配置 yazi 使用 nvim 作为 yazi 默认文本编辑器
# export EDITOR="nvim -u $WINKIT_HOME/root/files/sim/init.lua"

# 设置 yazi 配置目录 https://yazi-rs.github.io/docs/configuration/overview
export YAZI_CONFIG_HOME="$WINKIT_HOME/share/yazi/config"

# 配置 CMACKE 环境变量
export PATH="$WINKIT_HOME/share/cmake-4.1.1-windows-x86_64/bin":$PATH
